package weka_valutation;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.PrintStream;
import java.util.LinkedList;
import java.util.List;
import java.util.Random;


import mainWeka.WekaLauncher;
import mysql.DBCache;
import mysql.Tweet2db;

public class wekaValutation {
	static DBCache dbCache;
	public static void main(String[] args) throws Exception {
		
		WekaLauncher wk = new WekaLauncher();
		Tweet2db t2d = new Tweet2db();
		List<String> tweets;
		dbCache = DBCache.getInstance();
		tweets = dbCache.getAllTweet();
		int i=1;
		for(String twt : tweets)	
		if (wk.run(twt).equals("0"))t2d.insertTweetValutation(i,"BAD");
		else t2d.insertTweetValutation(i,"GOOD");
	}
}
